$('.upload').click(function () {
    $('#thumb_upload').click();
})
//文件上传
var url = $('#imgurl').val();
var opts = {
    url: url,
    type: "POST",
    beforeSend: function () {
        //$("#loading").attr("class", "am-icon-spinner am-icon-pulse");
    },
    success: function (result, status, xhr) {
        if (result.status == "0") {
            alert(result.info);
            return false;
        }
        $('input[name=img]').val(result.info);
        $("#img_show").show();
        $("#img_show").attr('src', result.info);
        //$(".tag").removeClass('remove_tag').attr('class','am-close am-close-alt am-close-spin am-icon-times tag show_tag');
        //$("#loading").attr("class", "am-icon-cloud-upload");
    },
    error: function (result, status, errorThrown) {
        alert('文件上传失败');
    }
}
$('#thumb_upload').fileUpload(opts);

